package com.ruoyi.project.drugs.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.Objects;

public class Item {
    private Integer itemid;
    private String itemname;
    private Integer itemprice;
    private String hname;
    private String itemcheck;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createtime;
    private String founder;

    @Override
    public String toString() {
        return "Item{" +
                "itemid=" + itemid +
                ", itemname='" + itemname + '\'' +
                ", itemprice=" + itemprice +
                ", hname='" + hname + '\'' +
                ", itemcheck='" + itemcheck + '\'' +
                ", createtime=" + createtime +
                ", founder='" + founder + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Item item = (Item) o;
        return Objects.equals(itemid, item.itemid) &&
                Objects.equals(itemname, item.itemname) &&
                Objects.equals(itemprice, item.itemprice) &&
                Objects.equals(hname, item.hname) &&
                Objects.equals(itemcheck, item.itemcheck) &&
                Objects.equals(createtime, item.createtime) &&
                Objects.equals(founder, item.founder);
    }

    @Override
    public int hashCode() {
        return Objects.hash(itemid, itemname, itemprice, hname, itemcheck, createtime, founder);
    }

    public Integer getItemid() {
        return itemid;
    }

    public void setItemid(Integer itemid) {
        this.itemid = itemid;
    }

    public String getItemname() {
        return itemname;
    }

    public void setItemname(String itemname) {
        this.itemname = itemname;
    }

    public Integer getItemprice() {
        return itemprice;
    }

    public void setItemprice(Integer itemprice) {
        this.itemprice = itemprice;
    }

    public String getHname() {
        return hname;
    }

    public void setHname(String hname) {
        this.hname = hname;
    }

    public String getItemcheck() {
        return itemcheck;
    }

    public void setItemcheck(String itemcheck) {
        this.itemcheck = itemcheck;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getFounder() {
        return founder;
    }

    public void setFounder(String founder) {
        this.founder = founder;
    }

    public Item() {
    }

    public Item(Integer itemid, String itemname, Integer itemprice, String hname, String itemcheck, Date createtime, String founder) {
        this.itemid = itemid;
        this.itemname = itemname;
        this.itemprice = itemprice;
        this.hname = hname;
        this.itemcheck = itemcheck;
        this.createtime = createtime;
        this.founder = founder;
    }
}
